type Method = 'Post'| 'Get'

function request(url:string,method:Method) {
  console.log(url,method);
  
}

const req = {
  url:'www.baidu.com',
  method:'Get'
} as const

request(req.url,req.method)

